#ifndef DANCI_FORM_H
#define DANCI_FORM_H

#include <QWidget>
#include <QSqlDatabase>
#include <QMessageBox>
#include <QSqlQuery>
#include <QSqlTableModel>
#include <QTimer>
//新建数据库类
class database
{
public:
    database();     //构造函数
    QSqlDatabase db;                //新建db
    QSqlDatabase initDatabase(QString name);                //设置数据库名字
    void closedb();             //关闭数据库
};
namespace Ui {
class Danci_Form;
}

class Danci_Form : public QWidget
{
    Q_OBJECT

public:
    explicit Danci_Form(QWidget *parent = 0);
    ~Danci_Form();
    QTimer *timer;

private slots:
    void on_pushButton_close_clicked();             //关闭按钮槽函数

    void on_pushButton_4_clicked();
    void on_pushButton_1_clicked();

    void on_comboBox_activated(const QString &arg1);

    void on_pushButton_2_clicked();

    void on_pushButton_6_clicked();

    //    void on_radioButton_clicked();

    //    void on_radioButton_2_clicked();

    //    void on_radioButton_3_clicked();

    //    void on_radioButton_4_clicked();

    void on_pushButton_11_clicked();

    void on_pushButton_9_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_10_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_13_clicked();

    void on_pushButton_5_clicked();

    void post_word_monet();

    void on_widget_shengci_destroyed();

    void on_widget_shengci_destroyed(QObject *arg1);

signals:
    void close_word();              //关闭背单词信号

    void word_money(int temp);

private:
    Ui::Danci_Form *ui;
    database dbOpen;
    QSqlDatabase word_Date,word_Date_Test,shengciben;
    QSqlQuery *query_select_word,*query_select_word_test,*shengci;
    QSqlTableModel *model;
    QString word_exp;
};

#endif // DANCI_FORM_H
